home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / get_cmt.arj / GET_CMT.DOC next >
Text File  |  1991-01-06  |  4KB  |  81 lines

  1.     This modeled closely after getcmt.c ( from snippets ).  Main
  2. differences include:
  3.  
  4. 1) This correctly parses strings, and doesn't (incorrectly) take an open
  5. comment token in a string to signal the beginning of a comment.
  6.  
  7. 2) It prints an error message if it finds a close comment without an
  8. open comment preceding it.
  9.  
  10. 3) Use of DOS wildcards to specify file-names.
  11.  
  12. 4) It will look for files with the following extensions if none is
  13. specified: .c, .cpp, .cxx, .cc, ,.h, .hpp, .hxx.  I believe this will
  14. accomodate the naming conventions of most c and c++ compilers, but more
  15. are easily added if needed.
  16.  
  17. 5) As you might expect from the mention of c++ above, this recognizes
  18. c++ style comments as well as normal C comments.
  19.  
  20. Switch characters: Upper or lower case.  Unrecognized options will print
  21. a short help message.
  22.  
  23.     You can specify an output file for the comments to be printed on in
  24. either of two ways:
  25.     a) -e.ext   Specify a new extension to be appended to the base name
  26. of the file being looked at.  eg. get_cmt -e.cmt lexyy.c would append
  27. the text of the comments in lexyy.c to lexyy.cmt.
  28.     b) -ofilename will place all the comments from all files examined in
  29. the file named. eg. get_cmt -ocomments lexyy.c would append the comments
  30. contained in lexyy.c to the file named comments, if it existed.  If it
  31. doesn't exist, it will be created.  If both -e and -o are specified, -e
  32. takes precedence.
  33.  
  34.     -l places line-numbers on which comments were found before each
  35. comment printed.
  36.  
  37.     In case anyone doesn't have access to lex/flex/whatever to translate
  38. the .l file to c, I've included the source code ready for compilation.
  39. As far as I know, it is reasonably ( more than reasonably, actually )
  40. portable and should compile under most DOS or Unix C compilers without
  41. problems.  It's been tested with Borland c++ 2.0, Microsoft Quick C, and
  42. GNU C 1.39.  Some compilers ( Borland's in particular ) will complain
  43. about unreacable code, but otherwise, this compiles quite cleanly.
  44.  
  45.     This program was written in Dec. 1991 by Jerry Coffin.  The actual
  46. lex source code is public domain.  The C code inluded, as well as the
  47. executable, are derived works of GNU, because I used flex in producing
  48. them.  ( I think that makes them derived works, in the case of flex,
  49. since it embeds source code from it's skeleton file into the program it
  50. produces.  If this is incorrect, anyone is free to correct me.  )
  51. Assuming they are derived works, you are required to provide source code
  52. if you re-distribute them.  On the othe hand, if you start with the
  53. original source code, and produce a new lexyy.c ( or whatever ) with a
  54. lex without the restrictions placed on flex output, you are more than
  55. welcome to do what you will with your program.  The executable was
  56. produced with Borland C++ 2.0, and contains portions that are copyright
  57. Borland International.  To provide credit where due, I should point out
  58. that this is based on a program by originally by Greg Messer ( Byte
  59. Magic Software ) and modified by Bob Stout.  I'm deeply indebted to
  60. both of them.
  61.  
  62.     Unabashed commercial message follows.  Please ignore it, if it might
  63. offend you.
  64.  
  65.     By the way, I'm presently working at Taco Bell.  If you happen to be
  66. impressed by the programming of this, or anything else I've written,
  67. please feel free to bring my name up as likely being available for
  68. programming positions you know of being available.  Thank You.
  69.  
  70.     And now back to our regurlarly scheduled programming.
  71.  
  72.     I hope you find this program enjoyable, informative or useful, or
  73. best of all, all of the above.  If wish to find fault with it, please
  74. feel free to contact the author, Jerry Coffin, on the FidoNet C_echo, or
  75. any where else you can find him.  As I write this ( Jan. 1992 ) I
  76. frequent several interenational echos on FidoNet.  With a little luck,
  77. this program may actually be useful enough that it will still be in use
  78. when some portion of the above stuff becomes obselete.
  79.     Later,
  80.     Jerry.
  81.